namespace ext.grid
{
	using System;
	using System.Runtime.CompilerServices;
	using System.Html;
	using System.Collections;
	
	
	/// <summary>
	/// This class provides the basic implementation for singlecell selection in a grid.
	/// The object stored as the selection contains the following properties:
	///   cell : see {@link #getSelectedCell}
	/// record : Ext.data.record The {@link Ext.data.Record Record}
	/// which provides the data for the row containing the selection
	/// </summary>
	/// <htmlSummary>
	/// This class provides the basic implementation for &lt;i&gt;single&lt;/i&gt; &lt;b&gt;cell&lt;/b&gt; selection in a grid.
	/// The object stored as the selection contains the following properties:
	/// &lt;div class=&quot;mdetail-params&quot;&gt;&lt;ul&gt;
	/// &lt;li&gt;&lt;b&gt;cell&lt;/b&gt; : see {@link #getSelectedCell}
	/// &lt;li&gt;&lt;b&gt;record&lt;/b&gt; : Ext.data.record The {@link Ext.data.Record Record}
	/// which provides the data for the row containing the selection&lt;/li&gt;
	/// &lt;/ul&gt;&lt;/div&gt;
	/// </htmlSummary>
	/// <definedin>src\widgets\grid\CellSelectionModel.js</definedin>
	[ScriptName("CellSelectionModel")]
	[ScriptNamespace("Ext.grid")]
	[Imported()]
	public partial class CellSelectionModel : ext.grid.AbstractSelectionModel
	{
		
		#region Constructors
		/// <summary>Constructor</summary>
		/// <param name="config">The object containing the configuration of this model.</param>
		public CellSelectionModel(object config)
		{
		}
		
		/// <summary>Constructor</summary>
		public CellSelectionModel()
		{
		}
		#endregion
		
		#region Fields
		/// <summary>Fires before a cell is selected, return false to cancel the selection.</summary>
		/// <definedin>src\widgets\grid\CellSelectionModel.js</definedin>
		[ScriptName("beforecellselectEventName")]
		public const string BeforecellselectEventName = "beforecellselect";
		
		/// <summary>Fires when a cell is selected.</summary>
		/// <definedin>src\widgets\grid\CellSelectionModel.js</definedin>
		[ScriptName("cellselectEventName")]
		public const string CellselectEventName = "cellselect";
		
		/// <summary>Fires when the active selection changes.</summary>
		/// <definedin>src\widgets\grid\CellSelectionModel.js</definedin>
		[ScriptName("selectionchangeEventName")]
		public const string SelectionchangeEventName = "selectionchange";
		#endregion
		
		#region Methods
		/// <summary>
		/// Returns an array containing the row and column indexes of the currently selected cell
		/// (e.g., [0, 0]), or null if none selected. The array has elements:
		///   rowIndex : Number The index of the selected row   cellIndex : Number The index of the selected cell.
		/// Due to possible column reordering, the cellIndex should not be used as an
		/// index into the Record&apos;s data. Instead, use the cellIndex to determine the name
		/// of the selected cell and use the field name to retrieve the data value from the record: 
		/// // get name
		/// var fieldName = grid.getColumnModel().getDataIndex(cellIndex);
		/// // get data value based on name
		/// var data = record.get(fieldName);
		/// </summary>
		/// <htmlSummary>
		/// Returns an array containing the row and column indexes of the currently selected cell
		/// (e.g., [0, 0]), or null if none selected. The array has elements:
		/// &lt;div class=&quot;mdetail-params&quot;&gt;&lt;ul&gt;
		/// &lt;li&gt;&lt;b&gt;rowIndex&lt;/b&gt; : Number&lt;p class=&quot;sub-desc&quot;&gt;The index of the selected row&lt;/p&gt;&lt;/li&gt;
		/// &lt;li&gt;&lt;b&gt;cellIndex&lt;/b&gt; : Number&lt;p class=&quot;sub-desc&quot;&gt;The index of the selected cell.
		/// Due to possible column reordering, the cellIndex should &lt;b&gt;not&lt;/b&gt; be used as an
		/// index into the Record&apos;s data. Instead, use the cellIndex to determine the &lt;i&gt;name&lt;/i&gt;
		/// of the selected cell and use the field name to retrieve the data value from the record:&lt;pre&gt;&lt;code&gt;
		/// // get name
		/// var fieldName = grid.getColumnModel().getDataIndex(cellIndex);
		/// // get data value based on name
		/// var data = record.get(fieldName);
		/// &lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&lt;/li&gt;
		/// &lt;/ul&gt;&lt;/div&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\grid\CellSelectionModel.js</definedin>
		/// <returns>An array containing the row and column indexes of the selected cell, or null if none selected.</returns>
		[ScriptName("getSelectedCell")]
		public System.Array GetSelectedCell()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>If anything is selected, clears all selections and fires the selectionchange event.</summary>
		/// <definedin>src\widgets\grid\CellSelectionModel.js</definedin>
		/// <param name="preventNotify">
		/// &lt;tt&gt;true&lt;/tt&gt; to prevent the gridview from
		/// being notified about the change.
		/// </param>
		[ScriptName("clearSelections")]
		public void ClearSelections(bool preventNotify)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Returns true if there is a selection.</summary>
		/// <htmlSummary>Returns &lt;tt&gt;true&lt;/tt&gt; if there is a selection.</htmlSummary>
		/// <definedin>src\widgets\grid\CellSelectionModel.js</definedin>
		[ScriptName("hasSelection")]
		public bool HasSelection()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Selects a cell. Before selecting a cell, fires the
		/// {@link #beforecellselect} event. If this check is satisfied the cell
		/// will be selected and followed up by firing the {@link #cellselect} and
		/// {@link #selectionchange} events.
		/// </summary>
		/// <definedin>src\widgets\grid\CellSelectionModel.js</definedin>
		/// <param name="rowIndex">The index of the row to select</param>
		/// <param name="colIndex">The index of the column to select</param>
		/// <param name="preventViewNotify">
		/// Specify &lt;tt&gt;true&lt;/tt&gt; to
		/// prevent notifying the view (disables updating the selected appearance)
		/// </param>
		/// <param name="preventFocus">
		/// Whether to prevent the cell at
		/// the specified rowIndex / colIndex from being focused.
		/// </param>
		/// <param name="r">The record to select</param>
		[ScriptName("select")]
		public void Select(System.Number rowIndex, System.Number colIndex, bool preventViewNotify, bool preventFocus, ext.data.RecordClass r)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Selects a cell. Before selecting a cell, fires the
		/// {@link #beforecellselect} event. If this check is satisfied the cell
		/// will be selected and followed up by firing the {@link #cellselect} and
		/// {@link #selectionchange} events.
		/// </summary>
		/// <definedin>src\widgets\grid\CellSelectionModel.js</definedin>
		/// <param name="rowIndex">The index of the row to select</param>
		/// <param name="colIndex">The index of the column to select</param>
		/// <param name="preventViewNotify">
		/// Specify &lt;tt&gt;true&lt;/tt&gt; to
		/// prevent notifying the view (disables updating the selected appearance)
		/// </param>
		/// <param name="preventFocus">
		/// Whether to prevent the cell at
		/// the specified rowIndex / colIndex from being focused.
		/// </param>
		[ScriptName("select")]
		public void Select(System.Number rowIndex, System.Number colIndex, bool preventViewNotify, bool preventFocus)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Selects a cell. Before selecting a cell, fires the
		/// {@link #beforecellselect} event. If this check is satisfied the cell
		/// will be selected and followed up by firing the {@link #cellselect} and
		/// {@link #selectionchange} events.
		/// </summary>
		/// <definedin>src\widgets\grid\CellSelectionModel.js</definedin>
		/// <param name="rowIndex">The index of the row to select</param>
		/// <param name="colIndex">The index of the column to select</param>
		/// <param name="preventViewNotify">
		/// Specify &lt;tt&gt;true&lt;/tt&gt; to
		/// prevent notifying the view (disables updating the selected appearance)
		/// </param>
		[ScriptName("select")]
		public void Select(System.Number rowIndex, System.Number colIndex, bool preventViewNotify)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Selects a cell. Before selecting a cell, fires the
		/// {@link #beforecellselect} event. If this check is satisfied the cell
		/// will be selected and followed up by firing the {@link #cellselect} and
		/// {@link #selectionchange} events.
		/// </summary>
		/// <definedin>src\widgets\grid\CellSelectionModel.js</definedin>
		/// <param name="rowIndex">The index of the row to select</param>
		/// <param name="colIndex">The index of the column to select</param>
		[ScriptName("select")]
		public void Select(System.Number rowIndex, System.Number colIndex)
		{
			throw new System.Exception("Imported - not implemented");
		}
		#endregion
		
		#region Events
		/// <summary>Fires before a cell is selected, return false to cancel the selection.</summary>
		/// <definedin>src\widgets\grid\CellSelectionModel.js</definedin>
		[ScriptName("beforecellselect")]
		public event ext.auto.Delegate_ext_grid_CellSelectionModel_And_System_Number_And_System_Number Beforecellselect;
		
		/// <summary>Fires when a cell is selected.</summary>
		/// <definedin>src\widgets\grid\CellSelectionModel.js</definedin>
		[ScriptName("cellselect")]
		public event ext.auto.Delegate_ext_grid_CellSelectionModel_And_System_Number_And_System_Number Cellselect;
		
		/// <summary>Fires when the active selection changes.</summary>
		/// <definedin>src\widgets\grid\CellSelectionModel.js</definedin>
		[ScriptName("selectionchange")]
		public event ext.auto.Delegate_ext_grid_CellSelectionModel_And_System_Object Selectionchange;
		#endregion
	}
}
